package com.djx.comm.exception;


import com.djx.comm.enums.ResultEnum;

/**
 * HRCS异常
 * @author dingjunxiong
 *
 */
public class MyException extends RuntimeException {

	private static final long serialVersionUID = -4816200310664519070L;
	/** 编码 **/
	private String code="-1";
	/** 描述 **/
	private String message;

	public MyException(String code, String msg) {
		super(msg);
		this.code = code;
		this.message = msg;
		
	}
	
	public MyException(String msg) {
		super(msg);
		this.message = msg;
		
	}
	
	public MyException(String msg, Throwable cause) {
		super(msg,cause);
		this.message = msg;
		
	}
	
	public MyException(ResultEnum resut) {
		super(resut.getKey());
		this.message = resut.getKey();
		
	}

	public String getCode() {
		return code;
	}

	public void setCode(String code) {
		this.code = code;
	}

	public String getMessage() {
		return message;
	}

	public void setMessage(String message) {
		this.message = message;
	}

	
}
